<%@ page import="java.io.PrintWriter" %>
<%@ page import="com.auth.checkCode" %>
<%@ page import="java.io.File" %>
<%@ page import="java.awt.image.BufferedImage" %>
<%@ page import="java.awt.*" %>
<%@ page import="javax.imageio.stream.FileImageOutputStream" %>
<%@ page import="java.util.Date" %>
<!DOCTYPE html>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<meta http-equiv="Pragma" content="no-cache">

<meta http-equiv="Cache-Control" content="no-cache">

<meta http-equiv="Expires" content="0">
<head>
    <title>loginPage</title>
</head>

<%
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter pt = response.getWriter();

%>


<style type="text/css">

    body{
        background-color: antiquewhite;
    }
    #box{
        width: 1400px;
        height: 720px;
    }
    #box1{
        width: 350px;
        height: 600px;
        margin: 0 auto;
    }
    a{
        text-decoration: none;
    }
    a:hover{
        background-color: cornflowerblue;
    }
    #btn{
        margin-left: 50px;
        width: 150px;
        height: 30px;
    }
    #reload{
        width: 100px;
        height: 60px;
        float: right;
    }




</style>



<body>


<%
    pt.print("<div id=\"box\">");
    pt.print("<div id=\"box1\">");
    pt.print("<h3 align=\"center\">登录</h3>\n" +
            "   <br/>");
//    pt.print(" <form method=\"post\" action=\"loginServlet\">");
    pt.print("<form method=\"post\" action=\"loginServlet\">\n" +
            "\n" +
            "      帐号：&nbsp;&nbsp;&nbsp; <input type=\"text\" name=\"userid\" required>\n" +
            "       <br/><br/>\n" +
            "       密码：&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"password\" name=\"password\" required>\n" +
            "       <br/><br/>\n" +
                    "验证码：<input type=\"text\" name=\"checkcode\" require>&nbsp;&nbsp; <img id=\"img1\" src=\"ImageServlet\">     <br/>" +
            "<div id=\"reload\"> <a href='#' id=\"look\" >看不清？</a> </div><br/> "+
            "       &nbsp;&nbsp;&nbsp;<input id=\"btn\" type=\"submit\" value=\"登录\">\n" +
            "       &nbsp;&nbsp;&nbsp;&nbsp;\n" +
            "       &nbsp;&nbsp;\n" +
            "       &nbsp;&nbsp;\n" +
            "       &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\n" +
            "   </form>");
    pt.print(" <a href=\"register.jsp\">注册帐号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a href=\"index.jsp\">通过游客进入</a>");
    pt.print("</div>");
    pt.print("</div>");
%>


</body>


<script>

    var img=document.getElementById('img1');
    img.onclick=function () {
        var path="ImageServlet?time="+new Date();
        img.src=path;
    }
      var look= document.getElementById('look');
    look.onclick=function () {
        var path="ImageServlet?time="+new Date();
        img.src=path;
    }


</script>


</html>
